<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
	uri="/WEB-INF/tags/shiro.tld"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>表单管理(档案，著录状态)</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
	<%@ page import="java.util.Date" %>
	<%
Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
String languageCode="zh_CN";
if(lang!=null){
	languageCode=lang.toString();
}
	Locale locale =SessionHelper.getLocaleByUser(request);
%>
<jsp:include
	page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<script type="text/javascript"
	src="avicit/cbb/techclass/billdefine/billdefine_archive_record.js?v=<%=new Date().getTime()%>"></script>
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<%
String sysId = request.getParameter("sysId");
String tableName = request.getParameter("tableName");
String nodeId = request.getParameter("nodeId");
String tableId = request.getParameter("tableId");
String nodeName =  URLDecoder.decode(request.getParameter("nodeName"), "utf-8");
%>
<script type="text/javascript"
	src="avicit/cbb/techclass/billdefine/locale/language_<%=languageCode%>.js"></script>
<script type="text/javascript">
var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
	//此事件必须放在jsp中,不能提取到js中,否则不能加载数据
	$(function() {
		sysId = "<%=sysId%>";
		tableName = "<%=tableName%>";
		tableId = "<%=tableId%>";
		nodeId = "<%=nodeId%>";
		nodeName = "<%=nodeName%>";
		$('#cbbBillDefineDataGrid').datagrid({
							url : 'platform/cbb/billDefineManagerController/getCbbBillDefineManagerData.json?sysId='
									+ sysId
									+ '&nodeId='
									+ nodeId
									+ "&tableName="
									+ tableName
									+ "&tableId="
									+ tableId + "&nodeName=" + encodeURI(encodeURI(nodeName)) +"&archiveStatus=2",
							onLoadSuccess : buttonControl()
						});
	});
	
	// SanXiaFiles Create By Tangkun start
	function getResultByInput(){
		$('#cbbBillDefineDataGrid').datagrid({
			url : 'platform/cbb/billDefineManagerController/getCbbBillDefineManagerData.json?sysId='
				+ sysId
				+ '&nodeId='
				+ nodeId
				+ "&tableName="
				+ tableName
				+ "&tableId="
				+ tableId + "&nodeName=" + nodeName
				+ "&inputWord=" + encodeURI(encodeURI($('#query').val()))+"&archiveStatus=2"
		});
	}
	
	function keyDownQuery(){
		if(event.keyCode==13){
			getResultByInput();
		}
	}
	// SanXiaFiles Create By Tangkun End

$(window).resize(function(){
	setTimeout(function(){
		$("#formShowDialog").dialog('resize',{
			width:$(window).width(),
			height:$(window).height()
		})
	},300)
})
</script>
<style type="text/css">
.textbox {
	border: solid 1px #a5acb5;
}

.input,img {
	vertical-align: middle;
}

<!--
实现input和img水平对齐 -->.labelbg {
	background:
		url('../../js/jQuery/jquery-easyui-1.3.5/themes/icons/required.gif')
		right 0 no-repeat;
}
</style>
</head>
<body id="myBody" class="easyui-layout">
	<div data-options="region:'center'"
		style="height: 0; overflow: hidden; font-size: 0;">
		<div id="tb" style="padding:10px 20px;">
			<sec:accesscontrollist hasPermission="3"
				domainObject="billdefine_billdefine_manager_button_accept">
				<%-- 保存 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-im-save"
					onclick="accept();" href="javascript:void(0);" id="accept"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.button.save","i18n.lantop",locale)%></a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="billdefine_billdefine_manager_button_setColumn">
				<%-- 设置模板列数 --%>
				<a id="setColumn" onclick="setColumn();" href="javascript:void(0)" class="easyui-linkbutton selbtn">
				<img src="avicit/im/lantop/common/search/image/icon_tool35_blue.png">
				<span class="selbtc"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.button.setTemplateColumnNum","i18n.lantop",locale)%></span>
				</a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="billdefine_billdefine_manager_button_openForm">
				<%-- 表单预览 --%>
					
				<a id="openForm" onclick="openForm();" href="javascript:void(0)" class="easyui-linkbutton selbtn">
				<img src="avicit/im/lantop/common/search/image/icon_px05.png"  style=" margin-top: 3px;">
				<span class="selbtc"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.button.formPreview","i18n.lantop",locale)%></span>
				</a>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="billdefine_billdefine_manager_button_reset">
				<%-- 重置 --%>
				<a class="easyui-linkbutton selbtnc" iconCls="icon-redo"
					onclick="reset();" href="javascript:void(0);" id="reset">
					
					<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.button.reset","i18n.lantop",locale)%>
					</a>
			</sec:accesscontrollist>
			<!--   
				SanXiaFiles Create By Tangkun End 
				-->
				
				<div style="background:white;width:150px;height:25px;margin-right:10px;border-radius:3px;border:1px solid #ccc;float:right;">
				<input id="query" onblur="getResultByInput()" onkeydown="keyDownQuery();" placeholder="快速检索" type="text"style="float:left;box-sizing:border-box;padding-left:5px;width:123px;height:25px;outline:none;border:none;"/>
				<img src="avicit/im/lantop/common/search/image/icon_tool14.png" style="float:right;margin-top:2px;margin-right:2px;cursor: pointer;">
				</div>
				<!-- 
				 SanXiaFiles Create By Tangkun End  onClickRow:onClickRow,
			-->
		</div>
		<table id="cbbBillDefineDataGrid" 
			data-options="
										rownumbers: true,
										animate: true,
										collapsible: false,
										fitColumns: true,
										autoRowHeight: false,
										singleSelect: true,
										pagination:true,
										pageSize:100, 
										pageList:[100,150,200],
										scrollbarSize:0,
							    		striped:true,
										fit:true,
										method: 'post',
										toolbar: '#tb',
										onClickRow:onClickRow,
										selectOnCheck : false,
										checkOnSelect : false
									">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_ID">
						<th data-options="field:'ID', halign:'center',checkbox:true"
							title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_LABEL">
						<%-- 字段中文名 --%>
						<th
							data-options="field:'COL_LABEL',halign:'center', align:'center'"
							width="100" title="字段英文名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.fieldCHNName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_NAME">
						<%-- 字段名 --%>
						<th
							data-options="field:'COL_NAME', halign:'center', align:'center'"
							width="100" title="字段名"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.fieldName","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_TYPE">
						<%-- 字段类型 --%>
						<th
							data-options="field:'COL_TYPE', halign:'center', align:'center',formatter:fomaterColType"
							width="100" title="字段类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.fieldType","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_LENGTH">
						<%-- 长度 --%>
						<th
							data-options="field:'COL_LENGTH', halign:'center', align:'center'"
							width="100" title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.length","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_IS_MUST">
						<%-- 是否必著 --%>
						<th
							data-options="field:'COL_IS_MUST', halign:'center', align:'center',formatter:fomaterIsMust,editor:{type:'text'}"
							width="100" title="是否必著">是否必著</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_IS_MUST">
						<%-- 是否详细显示） --%>
						<th
							data-options="field:'COL_IS_DETAIL', halign:'center', align:'center',formatter:fomaterIsDetail,editor:{type:'text'}"
							width="100" title="是否详细显示">是否详细显示</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_IS_VISIBLE">
						<%-- 是否添加/编辑显示 --%>
						<th
							data-options="field:'COL_IS_VISIBLE', halign:'center', align:'center',formatter:fomaterIsVisible,editor:{type:'text'}"
							width="100" title="是否添加/编辑显示">是否添加/编辑显示</th>
					</sec:accesscontrollist>

					<sec:accesscontrollist hasPermission="3"
										   domainObject="billdefine_billdefine_manager_datagrid_ATTRIBUTE_04">
						<%-- 是否添加/编辑只读 --%>
						<th
								data-options="field:'ATTRIBUTE_04', halign:'center', align:'center',formatter:fomaterEditReadOnly,editor:{type:'text'}"
								width="100" title="是否添加/编辑只读">是否添加/编辑只读</th>
					</sec:accesscontrollist>

					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_IS_TAB_VISIBLE">
						<%-- 是否表格显示 --%>
						<th
							data-options="field:'COL_IS_TAB_VISIBLE', halign:'center', align:'center',formatter:fomaterIsTabVisible,editor:{type:'text'}"
							width="100" title="是否表格显示">是否表格显示</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_FORM_VERTICAL">
						<%-- 纵向栏数 --%>
						<th
							data-options="field:'FORM_VERTICAL', halign:'center', align:'center',editor:{type:'numberbox',options:{required:true,'validType':'length[1,2]'}},formatter:fomaterCol"
							width="100" title="顺序"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.lengthwaysNum","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_FORM_HORIZONTAL">
						<%-- 横向栏数 --%>
						<th
							data-options="field:'FORM_HORIZONTAL', halign:'center', align:'center',editor:{type:'numberbox',options:{required:true,'validType':'length[1,2]'}},formatter:fomaterRow"
							width="100" title="顺序"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.crosswiseNum","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_COL_ORDER">
						<%-- 表单顺序 --%>
						<th
							data-options="field:'COL_ORDER', halign:'center', align:'center',editor:{type:'numberbox',options:{required:true,'validType':'length[1,3]'}},formatter:fomaterOrder"
							width="100" title="表单顺序">表单顺序</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_ATTRIBUTE_12">
						<%-- 表格顺序 --%>
						<th
							data-options="field:'ATTRIBUTE_12', halign:'center', align:'center',editor:{type:'numberbox',options:{required:true,'validType':'length[1,3]'}},formatter:fomaterOrder"
							width="100" title="表格顺序">表格顺序</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="billdefine_billdefine_manager_datagrid_REMARK">
						<%-- 备注 --%>
						<th data-options="field:'REMARK', halign:'center', align:'center'"
							width="100" title="备注"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.formManager.table.comment","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table>
	</div>
</body>
<script type="text/javascript" src="static/js/platform/index/js/divscroll.js" ></script>
<script>
	$(function(){
		$(".datagrid-view2").find(".datagrid-body").perfectScrollbar();
	});
</script>
</html>
